-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf_hooks: resource timing idlharness #44460
Conversation
Review requested:
|
04099b8
to
5aa4d1a
Compare
@@ -30,6 +30,11 @@ const initiatorType = ''; | |||
const cacheMode = ''; | |||
|
|||
async function main() { | |||
const invalidValues = [ null, undefined, true, false, -1, 1.1, Infinity, NaN, '', 'foo', {}, [], () => {} ]; | |||
for (const value of invalidValues) { | |||
assert.throws(() => performance.setResourceTimingBufferSize(value), `${value} should throw`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should it throw?
assert.throws(() => performance.setResourceTimingBufferSize(value), `${value} should throw`); | |
assert.throws(() => performance.setResourceTimingBufferSize(value), { code:`ERR_INVALID_ARG_TYPE` }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semver-major as it adds a new global. It should be documented in globals.md
, and an entry should be added in lib/eslintrc.yml
as well.
Not all of the changes should be semver-major. I'll split this PR into smaller ones. |
PerformanceEntry
andPerformanceResourceTiming
to theglobalThis
.defineEventHandler
should check ifthis
is a validEventTarget
, as enforced by the idlharness.PerformanceResourceTiming
to inherit the public interfacePerformanceEntry
instead of the internalInternalPerformanceResourceTiming
.The first commit comes from #44439.